CherryPicked: [4.19] eus upgrade alignment#5170
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
SiboWang1997 can not be added as reviewer. Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.: 422 {"message": "Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"} |
9a15db7 to
70e88c5
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
SiboWang1997 can not be added as reviewer. Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.: 422 {"message": "Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"} |
Signed-off-by: Harel Meir <hmeir@redhat.com>
70e88c5 to
753896d
Compare
|
SiboWang1997 can not be added as reviewer. Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.: 422 {"message": "Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the RedHatQE/openshift-virtualization-tests repository.", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"} |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5202. Overlapping filestests/conftest.py |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
| from _pytest.runner import CallInfo | ||
| from kubernetes.dynamic.exceptions import ConflictError | ||
| from ocp_resources.resource import get_client | ||
| from packaging.version import Version |
There was a problem hiding this comment.
Test Execution Plan
Run smoke tests: False
No dependency path traced from any smoke-marked test to modified symbols. The six smoke files (, , , , , ) do not use EUS upgrade fixtures or call wait_for_mcp_update_completion / wait_for_mcp_update_end. The utilities/operator.py changes are backward-compatible (added timeout default param).
Run gating tests: True
Dependency path:
tests/virt/upgrade/test_upgrade_virt.py(gating) →@pytest.mark.usefixtures("virt_launcher_images_from_csv_before_upgrade")→get_virt_launcher_images_from_csv()intests/virt/upgrade/utils.py(renamed fromget_virt_launcher_image_from_csv, return type changedstr→set[str])tests/virt/upgrade/test_upgrade_virt.py(gating) →unupdated_vmi_pods_namesfixture →validate_vms_pod_updated(expected_virt_launcher_images=...)(signature changed to acceptset[str])tests/virt/upgrade/test_upgrade_virt.py(gating) →csv_after_upgradefixture → no longer falls back toeus_hco_target_csv_name
Affected tests to run
tests/virt/upgrade/test_upgrade_virt.py(gating) — fixture chain refactored:virt_launcher_images_from_csv_before_upgrade(renamed+returnsset),virt_migratable_vms(replacesmigratable_vms+upgrade_namespaces),csv_after_upgradesimplifiedtests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py(eus_upgrade) — full EUS upgrade path reworked: now driven by--cnv-version/--cnv-imageinstead of--eus-cnv-target-version; usesbuild_eus_upgrade_path_dictandcreated_target_hco_csv
Real tests (cluster required)
Root conftest.py changes affect pytest_cmdline_main at session startup: --eus-cnv-target-version option removed; EUS now requires --cnv-version and --cnv-image; odd-minor CNV version now raises a ValueError at startup (guarded by not config.option.collectonly).
Error path (validate odd-minor rejection — requires real cluster, not collection-only):
pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py --upgrade=eus --cnv-version=4.21.0 --cnv-image=<image> --eus-ocp-images=<img1>,<img2>
Expected: ValueError: EUS target version 4.21.0 must have an even minor version
Happy path (collection smoke-check with even-minor version):
pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py --upgrade=eus --cnv-version=4.22.0 --cnv-image=NA --eus-ocp-images=NA,NA --collect-only
Expected: session starts normally, tests collected without error
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Get the list of changed files in PR `#5170`
gh pr view 5170 --repo RedHatQE/openshift-virtualization-tests --json files --jq '.files[].path'
echo "---DIFF---"
# Get the actual diff
gh pr diff 5170 --repo RedHatQE/openshift-virtualization-testsLength of output: 38543 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Check smoke/gating markers in affected test files
echo "=== Smoke markers in affected files ==="
rg -n '`@pytest.mark.smoke`' \
tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \
tests/virt/upgrade/test_upgrade_virt.py 2>/dev/null || echo "None found"
echo ""
echo "=== Gating markers in affected files ==="
rg -n '`@pytest.mark.gating`' \
tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \
tests/virt/upgrade/test_upgrade_virt.py 2>/dev/null || echo "None found"
echo ""
echo "=== All markers in test_upgrade_virt.py ==="
rg -n 'pytest.mark' tests/virt/upgrade/test_upgrade_virt.py | head -40
echo ""
echo "=== All markers in test_eus_upgrade.py ==="
rg -n 'pytest.mark' tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py | head -40
echo ""
echo "=== Smoke-marked test files (repository-wide) ==="
rg -l '`@pytest.mark.smoke`' tests/ 2>/dev/null | head -30
echo ""
echo "=== Gating-marked test files (repository-wide) ==="
rg -l '`@pytest.mark.gating`' tests/ 2>/dev/null | head -30
echo ""
echo "=== Who calls wait_for_mcp_update_completion ==="
rg -rn 'wait_for_mcp_update_completion' tests/ utilities/ 2>/dev/null
echo ""
echo "=== Who calls wait_for_mcp_update_end ==="
rg -rn 'wait_for_mcp_update_end' tests/ utilities/ 2>/dev/null
echo ""
echo "=== Smoke tests that use upgrade conftest paths ==="
rg -l '`@pytest.mark.smoke`' tests/ 2>/dev/null | xargs -I{} dirname {} | sort -u | while read dir; do
# Check if any conftest.py in the path imports changed symbols
echo "Smoke dir: $dir"
doneLength of output: 7628 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Get the PR info to find the commit SHA and first changed file/line for inline comment
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5170 --jq '{head_sha: .head.sha, base_sha: .base.sha}'
echo ""
echo "=== PR files with patch info ==="
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5170/files \
--jq '.[] | {filename: .filename, patch: .patch}' | head -100Length of output: 38430 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Post inline review comment on the first changed line of conftest.py (position 4 in the diff)
gh api \
--method POST \
repos/RedHatQE/openshift-virtualization-tests/pulls/5170/reviews \
--field commit_id="753896d305acbe2e89c138ecb51613bd796e4fa9" \
--field event="COMMENT" \
--field body="" \
--field "comments[][path]=conftest.py" \
--field "comments[][position]=4" \
--field "comments[][body]=## Test Execution Plan
**Run smoke tests: False**
No dependency path traced from any smoke-marked test to modified symbols. The six smoke files (`tests/storage/cdi_upload/`, `tests/storage/cdi_clone/`, `tests/virt/cluster/common_templates/rhel/`, `tests/virt/node/general/`, `tests/install_upgrade_operators/csv/`, `tests/infrastructure/instance_types/`) do not use EUS upgrade fixtures or call \`wait_for_mcp_update_completion\` / \`wait_for_mcp_update_end\`. The \`utilities/operator.py\` changes are backward-compatible (added \`timeout\` default param).
**Run gating tests: True**
Dependency path:
- \`tests/virt/upgrade/test_upgrade_virt.py\` (gating) → \`@pytest.mark.usefixtures(\"virt_launcher_images_from_csv_before_upgrade\")\` → \`get_virt_launcher_images_from_csv()\` in \`tests/virt/upgrade/utils.py\` (renamed from \`get_virt_launcher_image_from_csv\`, return type changed \`str\` → \`set[str]\`)
- \`tests/virt/upgrade/test_upgrade_virt.py\` (gating) → \`unupdated_vmi_pods_names\` fixture → \`validate_vms_pod_updated(expected_virt_launcher_images=...)\` (signature changed to accept \`set[str]\`)
- \`tests/virt/upgrade/test_upgrade_virt.py\` (gating) → \`csv_after_upgrade\` fixture → no longer falls back to \`eus_hco_target_csv_name\`
**Affected tests to run**
- \`tests/virt/upgrade/test_upgrade_virt.py\` (gating) — fixture chain refactored: \`virt_launcher_images_from_csv_before_upgrade\` (renamed+returns \`set\`), \`virt_migratable_vms\` (replaces \`migratable_vms\`+\`upgrade_namespaces\`), \`csv_after_upgrade\` simplified
- \`tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py\` (eus_upgrade) — full EUS upgrade path reworked: now driven by \`--cnv-version\`/\`--cnv-image\` instead of \`--eus-cnv-target-version\`; uses \`build_eus_upgrade_path_dict\` and \`created_target_hco_csv\`
**Real tests (cluster required)**
Root \`conftest.py\` changes affect \`pytest_cmdline_main\` at session startup: \`--eus-cnv-target-version\` option removed; EUS now requires \`--cnv-version\` and \`--cnv-image\`; odd-minor CNV version now raises a \`ValueError\` at startup (guarded by \`not config.option.collectonly\`).
Error path (validate odd-minor rejection — requires real cluster, not collection-only):
\`\`\`
pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \
--upgrade=eus --cnv-version=4.21.0 --cnv-image=<image> --eus-ocp-images=<img1>,<img2>
\`\`\`
Expected: \`ValueError: EUS target version 4.21.0 must have an even minor version\`
Happy path (collection smoke-check with even-minor version):
\`\`\`
pytest tests/install_upgrade_operators/product_upgrade/test_eus_upgrade.py \
--upgrade=eus --cnv-version=4.22.0 --cnv-image=NA --eus-ocp-images=NA,NA --collect-only
\`\`\`
Expected: session starts normally, tests collected without error"Length of output: 5515 |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5331. Overlapping filesconftest.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5358. Overlapping filestests/conftest.py |
Short description:
Cherry-pick from #5055
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket: